home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / Projects / Questions & Answers / Q&A Programming Functions / Can I redefine help strings? < prev    next >
Encoding:
Text File  |  1998-10-26  |  1.6 KB  |  34 lines  |  [TEXT/ScoM]

  1. CAN I REDEFINE HELP STRINGS
  2.  
  3. >                When using oscillators in the vector generator, such as gen-sin, is it
  4. >possible to redefine the default returned text so that in the sample
  5. >argument, the word "samples" is returned instead of "256"?  I prefer to use 
  6. >        (setq samples n)
  7.  
  8. You can customize all using def-help. Look file Example Module, you'll
  9. find how to use def-help from there. Then define the function name and
  10. the help string. Store the file into environment/extensions so it will
  11. be loaded when you startup SCOM, and you'll have customized help
  12. strings.
  13.  
  14. (def-help '(
  15.    gen-sin "(gen-sin 1 1 samples 0)"
  16. ))
  17.  
  18. You must write the above into a new file, call it for example
  19. help definitions. Then save the file into Environment/Extensions
  20. folder. SCOM loads all extensions in this folder while booting up. To
  21. add new functions to the menus is done in the same way. Locate and
  22. open the Example Module in the Tools menu, then write your new functions
  23. using this as an example, and the menus and help strings, and then
  24. save it to Environment/Extensions folder. Give it a name like 
  25. my functions or other that you can later recognize it easily. You
  26. can later also access this file directly selecting it from the Tools/
  27. extensions menu.
  28.  
  29. It is not suggested to add menu items to existing menus because if
  30. the menus change your progam may not anymore find them. It is better if
  31. you define your own menu, described in the Example Module file. This
  32. menu will appear on the menu bar like PowerPack and MRAC. You can later
  33. compile your file to plug-in and copy protect it if needed (like MRAC).
  34.